﻿@using CodeGenerator.Core
@using System.Text
@{
    BuildHCodeCreate model = Model;
}
@@{
    ViewBag.Title = "@(model.TableInfo.Comments)";
    Layout = "~/Views/Shared/_Index.cshtml";
 }

<div class="titlePanel">
    <div class="title-search">
        <table>
            <tr>
                <td style="padding-left: 2px;">
                    <input id="keywords" type="text" class="form-control" placeholder="请输入要查询关键字" style="width: 200px;" />
                </td>
                <td style="padding-left: 5px;">
                    <a id="btn_Search" class="btn btn-primary"><i class="fa fa-search"></i>&nbsp;查询</a>
                </td>
            </tr>
        </table>
    </div>

    @if(model.BtnAuthorization)
    {
    <div class="toolbar PartialButton">
        @@Html.Partial("_PartialButton")
    </div>
    }
    else
    {
    <div class="toolbar">
        <div class="btn-group">
            @{
            if (model.Refresh){
            <a id="replace" class="btn btn-default" onclick="Reload()"><i class="fa fa-refresh"></i>&nbsp;刷新</a>
            }
            if (model.Add)
            {
            <a id="add" class="btn btn-default" title="新增(Ctrl+Z)" onclick="btn_add()"><i class="fa fa-plus"></i>&nbsp;新增</a>
            }
            if (model.Edit)
            {
            <a id="edit" class="btn btn-default" title="编辑" onclick="btn_edit()"><i class="fa fa-edit"></i>&nbsp;编辑</a>
            }
            if (model.Delete)
            {
            <a id="delete" class="btn btn-default" title="删除" onclick="btn_delete()"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            }
            if (model.Detail)
            {
            <a id="detail" class="btn btn-default" title="详细信息" onclick="btn_detail()"><i class="fa fa-list-alt"></i>&nbsp;详细</a>
            }
            if (model.Close)
            {
            <a id="leave" class="btn btn-default" title="关闭当前窗口" onclick="btn_back()"><i class="fa fa-close"></i>&nbsp;离开</a>
            }
            }
        </div>
    </div>
    }
    
</div>
<div class="gridPanel">
    <table id="gridTable"></table>
    <div id="gridPager"></div>
</div>

@@{Html.AppendJsFille(2, "~/Content/Js/@(model.AreaName)/@(model.Name)/Index.js");}